Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[staticroutebfd] fix ipv6 letter case issue #15765

Merged
merged 1 commit into from
Jul 10, 2023
Merged

[staticroutebfd] fix ipv6 letter case issue #15765

merged 1 commit into from
Jul 10, 2023

Conversation

baorliu
Copy link
Contributor

@baorliu baorliu commented Jul 9, 2023

use lower case for IPv6 address as internal key and bfd session key.

fixes #15764

Why I did it

staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.

Work item tracking
  • Microsoft ADO (number only): 25039238

How I did it

convert the IPv6 address string to lower case inside the staticroutebfd, and use the lowercase address to create BFD session.

How to verify it

Verified it both in UT and testbed.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

use lower case for IPv6 address as internal key and bfd session key.
Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@abdosi
Copy link
Contributor

abdosi commented Jul 10, 2023

@prsunny can you help merge with this.

@prsunny prsunny merged commit 4303308 into sonic-net:master Jul 10, 2023
17 checks passed
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
*use lower case for IPv6 address as internal key and bfd session key. fixes sonic-net#15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
@anamehra
Copy link
Contributor

@abdosi , This is required in 202305. Thanks

@abdosi
Copy link
Contributor

abdosi commented Dec 15, 2023

@StormLiangMS please help with cherry-pick for 202305.

@StormLiangMS
Copy link
Contributor

@abdosi could you have ADO to support this cherry pick?

@abdosi
Copy link
Contributor

abdosi commented Jan 5, 2024

@abdosi could you have ADO to support this cherry pick?

@StormLiangMS this is needed. ADO updated.

@StormLiangMS
Copy link
Contributor

hi @abdosi @baorliu this PR seems too old, auto cherry pick doesn't work, could you file one PR to 202305 for this fix?

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 1, 2024
*use lower case for IPv6 address as internal key and bfd session key. fixes sonic-net#15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #17981

@StormLiangMS
Copy link
Contributor

@abdosi @baorliu cherry pick PR failed, pls fix then resumbit. #17981

mssonicbld pushed a commit that referenced this pull request Feb 3, 2024
*use lower case for IPv6 address as internal key and bfd session key. fixes #15764

Why I did it
*staticroutebfd uses the IPv6 address string as a key to create bfd session and cache the bfd sessions using it as a key.
When the IPv6 address string has uppercase letter in the static route nexthop list, the string with uppercase letter key is stored in the cache, but the BFD STATE_DB uses lowercase for IPv6 address, so when the staticroutebfd get the bfd state event, it cannot find the bfd session in its local cache because of the letter case.
anamehra added a commit to anamehra/sonic-buildimage that referenced this pull request Feb 3, 2024
StormLiangMS pushed a commit that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants